export default {
  //名医列表
  loadDoctorList(params, callback) {
    Vue.http.get( '/doctor/list.json', {params:params}).then(function (response) {
      callback(response.data);
    });
  },
  //名医展示或下架
  loadDoctorShow(params, callback) {
    Vue.http.put( '/doctor/mgt.json', params).then(function (response) {
      callback(response.data);
    });
  },
  //城市列表
  loadCitiesList(callback) {
    Vue.http.get( '/base/city/list.json').then(function (response) {
      callback(response.data);
    });
  },
  //新增名医城市列表
  loadCitiesListAdd(callback) {
    Vue.http.get( '/base/city/all.json').then(function (response) {
      callback(response.data);
    });
  },
  //名医新增或修改
  loadDoctorEdit(params, callback_success, callback_error) {
    Vue.http.post( '/doctor/add.json', params).then(response => {
      callback_success(response.data);
    }, response => {
      callback_error(response.data)
    });
  },
  //科室列表
  loadDoctorDepartmentList(callback) {
    Vue.http.get( '/doctor/department/list.json').then(function (response) {
      callback(response.data);
    });
  },
  //职称列表
  loadDoctorTitleList(callback) {
    Vue.http.get( '/doctor/title/list.json').then(function (response) {
      callback(response.data);
    });
  },
  //名医详情
  loadDoctorDetail(params, callback) {
    Vue.http.get( '/doctor/detail.json', {params:params}).then(function (response) {
      callback(response.data);
    });
  },
}
